home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / GRAHAM / XA_6S.ZIP / SOURCE / XA_DEFS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-07  |  7.2 KB  |  175 lines

  1. /*
  2.  * XaAES - XaAES Ain't the AES
  3.  *
  4.  * A multitasking AES replacement for MiNT
  5.  *
  6.  */
  7.  
  8. #ifndef _XA_DEFS_H_
  9. #define _XA_DEFS_H_
  10.  
  11. /*----------------------------------------------------------------- */
  12. /* COMPILE TIME SWITCHES */
  13. /* - define as 1 to turn on, 0 to turn off */
  14. /*----------------------------------------------------------------- */
  15. /*#define GENERATE_DIAGS        0         Make the DIAGS macro print out diagnostics (defined in the .prj file now) */
  16.  
  17. #define USE_DEBUG_VECTOR        0        /* Hook trap3 instead of trap2 to allow debugging under GEM */
  18.  
  19. #define FORCE_WINDOWS            0        /* Force windows to do what the user says instead of just */
  20.                                         /* sending a WM_ message to the client (eg. if a window is topped */
  21.                                         /* do it straight away, and then send the client a message about it) */
  22.  
  23. #define SOLID_BOXES                0        /* Do graf_dragbox, graf_rubberbox, etc using a solid box instead of */
  24.                                         /* an outline */
  25.  
  26. #define DISPLAY_LOGO_IN_TITLE_BAR    0    /* Display the XaAES logo in the title bar of each window */
  27.  
  28. #define POINT_TO_TYPE            0        /* 0=Keyboard input goes to topped application */
  29.                                         /* 1=Keyboard input goes to application whose window is pointed at */
  30.  
  31. #define ALT_CTRL_APP_OPS        1        /* Some ALT+CTRL+key combo's will perform functions relating to */
  32.                                            /* the XaAES system */
  33.  
  34. #define USE_TMALARM                1        /* Use the 'un-official' Tmalarm() call to get better timing */
  35.  
  36. #define USE_CALL_DIRECT            1        /* Bypass the command pipe for certain op-codes */
  37.  
  38. #define SHOW_LOGO_AT_STARTUP    0        /* Run the XaAES logo program at startup */
  39.  
  40. #define EMULATE_AES4_1            1        /* 1=Emulate AES4.1, 0=Emulate AES1.4 */
  41.  
  42. #define AVOID_MINT_PIPES_BUG    1        /* Avoid a bug in MiNT pipes by opening as O_RDWR instead of O_RDONLY */
  43.                                         /* - disadvantage os that it uses double the memory for pipe buffers */
  44.  
  45. #define DODGY_MEMORY_PROTECTION    1        /* Enable patches to help with memory protection - these don't work,*/
  46.                                         /* so I recomend you leave them off */
  47.  
  48. #define DEBUG_MALLOCS            0        /* Use cmalloc() instead of malloc() for debugging purposes */
  49.  
  50. #define PRESERVE_DIALOG_BGD        0        /* Preserve the background of dialogs */
  51.  
  52. #define REALTIME_SCROLL            1        /* Realtime scroll bars */
  53.  
  54. #define DYNAMIC_CLIENT_STRUCTURE 0        /* Use a dynamic structure for the clients database */
  55.  
  56. #define OLD_NVDI                0        /* Compatible with NVDI2.5 (set to 0 for NVDI4 compatibility) */
  57.  
  58. #define FILESELECTOR_QSORT 1    /* Call the standard qsort() for fileselector listings */
  59.                                                             /* - this slows down big directorys a lot */
  60.                                                             
  61. /*----------------------------------------------------------------- */
  62. /* CONFIGURABLE PARAMETERS */
  63. #define WIDGET_SIZE            20            /* Default size of window widgets in pixels (for drawn widgets) */
  64. #define MAX_PID                500            /* Max number of client process' */
  65. #define AES_PRIORITY        -20            /* The process priority for the XaAES server (-20 is high priority) */
  66.  
  67. #define DU_RSX_CONV         8            /* Resource char to pixel coord conversion constants. */
  68. #define DU_RSY_CONV         16            /* If you are designing your resources in ST-Low res,  */
  69.                                         /*  change DU_RSY_CONV to 8 */
  70. #define STANDARD_FONT_POINT    10            /* Size of the 'standard' AES font (for window titles, etc) */
  71. #define SMALL_FONT_POINT    8            /* Size of the 'small' AES font. */
  72. #define STANDARD_AES_FONTID    1            /* Standard GDOS fontid for windows & stuff (set to 1 for no GDOS) */
  73.  
  74. #define GRAF_STEPS            10            /* Number of intermediate steps in a graf_growbox(), etc */
  75.  
  76. #define PUSH3D_DISTANCE        1            /* Distance text on selected (pushed in) 3D objects will move */
  77. #define SHADOW_OFFSET        2            /* Offset used for shadowing objects */
  78.  
  79. #define ICONIFIED_W            80            /* Size of an iconified window */
  80. #define ICONIFIED_H            80
  81.  
  82. #define DOUBLE_CLICK_TIME    50            /* Default double click time in milliseconds (0-200) */
  83.  
  84. #define RT_SCROLL_STEP        10            /* Step when doing a real-time scroll (0-1000) */
  85.  
  86. /*----------------------------------------------------------------- */
  87. /* VERSION NUMBER */
  88. #define XA_VERSION    "v0.6"                /* Version number */
  89. #define XA_AES_VERSION    0x0500            /* AES version number we are going to use */
  90.  
  91. /*----------------------------------------------------------------- */
  92. /* General Definitions  */
  93. #define TRUE    1
  94. #define FALSE    0
  95.  
  96. #ifndef NULL
  97. #define NULL    ((void *)0)
  98. #endif
  99.  
  100. /*----------------------------------------------------------------- */
  101. /* Return codes in the clients reply pipe */
  102. #define XA_OK                0L    /* Ok, op-code done */
  103. #define XA_UNIMPLEMENTED    1L    /* Unimpemented but valid op-code */
  104. #define XA_ILLEGAL            2L    /* Illegal op-code */
  105. #define XA_T_WAIT            3L    /* Re-select for a evnt_timer format timeout */
  106. #define XA_M_WAIT            4L    /* Re-select for a evnt_multi format timeout */
  107. #define XA_TVAL            0xffff0000L    /* Mask to get the timeout value */
  108.  
  109. /*----------------------------------------------------------------- */
  110. /* Return codes from op-code service functions */
  111. #define XAC_BLOCK            0L    /* Block the client indefinitely */
  112. #define XAC_DONE            1L    /* Function completed - release client immediately */
  113. #define XAC_T_TIMEOUT        2L    /* Block client, but timeout (evnt_timer format) */
  114. #define XAC_M_TIMEOUT        3L    /* Block client, but timeout (evnt_multi format) */
  115. #define XAC_TVAL        0xffff0000L    /* Mask to get the timeout value */
  116.  
  117. /*----------------------------------------------------------------- */
  118. /* Define the semaphores used in various places.... */
  119.  
  120. #define APPL_INIT_SEMAPHORE    'XA:I'        /* Semaphore id for appl_init() routine access */
  121. #define TRAP_HANDLER_SEMAPHORE    'XA:H'    /* Semaphore for access to part of the trap handler routine */
  122. #define WIN_LIST_SEMAPHORE    'XA:W'        /* Semaphore for order modify / entry delete access to the window list */
  123. #define ROOT_SEMAPHORE        'XA:R'        /* Semaphore for access to the root window */
  124. #define CLIENTS_SEMAPHORE    'XA:C'        /* Semaphore for access to the clients structure */
  125. #define FSELECT_SEMAPHORE    'XA:F'        /* Semaphore for access to the file selector */
  126.  
  127. #define UPDATE_LOCK            'XA:U'        /* Semaphore id for BEG_UPDATE */
  128. #define MOUSE_LOCK            'XA:M'        /* Semaphore id for BEG_MCTRL */
  129.  
  130. /*----------------------------------------------------------------- */
  131. /* Diagnostics */
  132. #if GENERATE_DIAGS
  133. #include <stdio.h>
  134. #define DIAGS(x) { printf("%s:%d:",__FILE__,__LINE__); printf x ; fflush(stdout); }
  135. #else
  136. #define DIAGS(x)
  137. #endif
  138.  
  139. /*----------------------------------------------------------------- */
  140. /* For debugging, I use trap 3 for XaAES so I can run it in tandem with multiTOS. */
  141. #if USE_DEBUG_VECTOR
  142. #define AES_TRAP        3
  143. #else
  144. #define AES_TRAP        2
  145. #endif
  146.  
  147. /*----------------------------------------------------------------- */
  148. /* Direct call interface enable */
  149. #if USE_CALL_DIRECT
  150. #define CALL_DIRECT(x) Kcall_direct[(x)]=TRUE
  151. #else
  152. #define CALL_DIRECT(x) Kcall_direct[(x)]=FALSE
  153. #endif
  154.  
  155. /*----------------------------------------------------------------- */
  156. /* MiNT Memory Allocation Stuff */
  157. #ifndef MX_STRAM
  158. #define MX_STRAM         0
  159. #define MX_TTRAM        1
  160. #define MX_PREFSTRAM    2
  161. #define MX_PREFTTRAM     3
  162. #define MX_HEADER        (1<<3)
  163. #define MX_PRIVATE        ((1<<3)|(1<<4))
  164. #define MX_GLOBAL        ((1<<3)|(2<<4))
  165. #define MX_SUPERVISOR    ((1<<3)|(3<<4))
  166. #define MX_READABLE        ((1<<3)|(4<<4))
  167. #endif
  168.  
  169. /* for debugging purposes */
  170. #if DEBUG_MALLOCS
  171. #define malloc(m) calloc(m,1)
  172. #endif
  173.  
  174. #endif
  175.